#include <iostream>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
using namespace std;
int main()
{
	pid_t cid;
	cid=fork();
	if(cid==0){
		if((execl("./child","child",(char*)NULL))==-1){
			cout<<"child error"<<endl;
			_exit(1);
		}
	}else{
		cout<<"This is father"<<endl;
		int status;
		waitpid(cid,&status,0);
	}
	return 0;
}
